MindFusion.Wpf Pack Programmer's Guide
Chart.SetDataSource Method
See Also
 





Sets the chart data source to the specified range of cells.

Namespace: MindFusion.Spreadsheet.Wpf.Charts
Assembly: MindFusion.Spreadsheet.Wpf

 Syntax

C#  Copy Code

public bool SetDataSource (
    string data,
    PlotBy plotBy,
    Nullable<Boolean> firstColumnAsLabel,
    Nullable<Boolean> firstRowAsLabel
)

Visual Basic  Copy Code

Public Function SetDataSource( _
    data As String, _
    plotBy As PlotBy, _
    firstColumnAsLabel As Nullable(Of Boolean), _
    firstRowAsLabel As Nullable(Of Boolean) _
) As Boolean

 Parameters

data

A string specifying a range of cells or an expression which evaluates to a range of cells.

plotBy

A flag specifying whether the series are created from the columns or from the rows in the specified range.

firstColumnAsLabel

A flag specifying whether to use the values in the first column of the specified range as labels, or null (Nothing in Visual Basic), to attempt to automatically determine this based on the type of the data. This parameter is ignored by some charts that do not display labels.

firstRowAsLabel

A flag specifying whether to use the values in the first row of the specified range as labels, or null (Nothing in Visual Basic), to attempt to automatically determine this based on the type of the data. This parameter is ignored by some charts that do not display labels.

 Return Value

true if the data source was successfully set; false if the specified string does not identify a range of cells.

 Remarks

The changes caused by this method are automatically recorded for subsequent undo, therefore it is not necessary to call this method in the scope of a TrackChangesCommand.

 See Also

Chart Members
Chart Class
MindFusion.Spreadsheet.Wpf.Charts Namespace